#!/bin/bash

./autogen.sh \
&& ./configure PYTHON=/usr/bin/python3 CC=clang CXX=clang++ CXXFLAGS='-O1' \
&& make -C Python \
&& make -C Python check \
&& make -C Python install \
&& grep -v QuantLib requirements.txt > Python/examples/requirements.txt \
&& pip install -r Python/examples/requirements.txt \
&& for i in Python/examples/*.py ; do echo "$i" && /usr/bin/python3 "$i" || break -1 ; done

